package com.platform.admin.controller;

import com.platform.admin.response.DefaultVO;
import com.platform.admin.service.TestService;
import com.platform.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *
 * </p>
 *
 * @author： yuanlai
 * @since 2021-07-25
 */
@RestController
@Api(tags = "测试控制器API")
@RequestMapping("/test")
@Slf4j
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class TestController {

    private final TestService testService;

    @ApiOperation("测试详情")
    @GetMapping("/getTestDetail")
    public R<DefaultVO> getTestDetail(@PathVariable Long id) {
        return R.ok(testService.getDetail(id));
    }
}
